using System.ComponentModel.DataAnnotations;
using System.Text.Json.Serialization;
using Eamon.MeituanDotnetSDK.api.common.request;
using Eamon.MeituanDotnetSDK.attribute;

namespace Eamon.MeituanDotnetSDK.model.ddzh.tuangou.tuangouReceiptQuerybymobile
{
    /// <summary>
    /// 手机号查询可用团购券
    /// </summary>
    [ApiMeta(
        Path = "/ddzh/tuangou/receipt/querybymobile",
        BusinessId = 58,
        ApiVersion = "10032",
        ApiName = "tuangou_receipt_querybymobile",
        NeedAuth = true
    )]
    public class TuangouReceiptQuerybymobileRequest : MeituanRequest<TuangouReceiptQuerybymobileResponse>
    {
        /// <summary>
        /// 点评用户绑定的手机号
        /// </summary>
        [Required(ErrorMessage = "mobile不能为空")]
        [JsonPropertyName("mobile")]
        public string Mobile { get; set; }

        /// <summary>
        /// 团购ID
        /// </summary>
        [Required(ErrorMessage = "dealGroupId不能为空")]
        [JsonPropertyName("dealGroupId")]
        public long? DealGroupId { get; set; }

        /// <summary>
        /// 套餐ID
        /// </summary>
        [Required(ErrorMessage = "dealId不能为空")]
        [JsonPropertyName("dealId")]
        public long? DealId { get; set; }

        /// <summary>
        /// 起始位置，从0开始
        /// </summary>
        [Required(ErrorMessage = "offset不能为空")]
        [JsonPropertyName("offset")]
        public int? Offset { get; set; }

        /// <summary>
        /// 查询数量，最大不超过30
        /// </summary>
        [Required(ErrorMessage = "limit不能为空")]
        [JsonPropertyName("limit")]
        public int? Limit { get; set; }

        /// <summary>
        /// 平台：1-大众点评，2-美团
        /// </summary>
        [Required(ErrorMessage = "platform不能为空")]
        [JsonPropertyName("platform")]
        public int? Platform { get; set; }

        public override string ToString()
        {
            return $"TuangouReceiptQuerybymobileRequest{{Mobile={Mobile}, DealGroupId={DealGroupId}, DealId={DealId}, Offset={Offset}, Limit={Limit}, Platform={Platform}}}";
        }
    }
}
